import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooCmsModelAuxiliaryTableController } from '../../../controllers';
const uctoocmsModelAuxiliaryTableRouter = new Router();
const cmsModelAuxiliaryTableController = new uctooCmsModelAuxiliaryTableController();

uctoocmsModelAuxiliaryTableRouter.post('/add', requireUser, cmsModelAuxiliaryTableController.add);
uctoocmsModelAuxiliaryTableRouter.post('/edit', requireUser, rowLevelPermission('uctoo/cms_model_auxiliary_table'), cmsModelAuxiliaryTableController.edit);
uctoocmsModelAuxiliaryTableRouter.post('/del', requireUser, rowLevelPermission('uctoo/cms_model_auxiliary_table'), cmsModelAuxiliaryTableController.delete);

//For getting cmsModelAuxiliaryTable with permission control
uctoocmsModelAuxiliaryTableRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/cms_model_auxiliary_table'), cmsModelAuxiliaryTableController.getSingle);
uctoocmsModelAuxiliaryTableRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/cms_model_auxiliary_table'), cmsModelAuxiliaryTableController.getMany);
uctoocmsModelAuxiliaryTableRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/cms_model_auxiliary_table'), cmsModelAuxiliaryTableController.getMany);

//#endregion AutoCreateCode
export default uctoocmsModelAuxiliaryTableRouter;
